package com.ssn.service;

import com.ssn.po.Blog;
import com.ssn.vo.BlogQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

public interface IBlogService {
    Blog findById(Long id);
    Blog getAndConvert(Long id);
    List<Blog> findAll();
    Map<String,List<Blog>> archivesBlog();
    Integer countBlogByPublished();
    Page<Blog> listBlog(Pageable pageable, BlogQuery blog);
    Page<Blog> listBlog(Pageable pageable, Long tagId);
    Page<Blog> listBlog(Pageable pageable);
    Page<Blog> listBlogPublished(Pageable pageable);
    Page<Blog> findBlogBySearch(String search,Pageable pageable);
    List<Blog> listBlog();
    List<Blog> listRecommendBlogTop(Integer size);
    Blog saveBlog(Blog blog);
    Blog updateBlog(Long id,Blog blog);
    void deleteBlog(Long id);
}
